#include <gtk/gtk.h>

GtkWidget *wrap_with_scroll_pane(GtkWidget *widget) {

    GtkWidget *scroll_pane = gtk_scrolled_window_new(NULL, NULL);
    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll_pane), widget);
    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_pane),
            GTK_POLICY_AUTOMATIC,
            GTK_POLICY_AUTOMATIC);
    gtk_widget_show(scroll_pane);

    return scroll_pane;
}

